<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
        #box{
            width: 200px;
            height: 200px;
            background-color: red;
            padding: 20px;
            border: 10px solid #000;
        }
    </style>
</head>
<body>
   <div id="box"></div>
<script>
   var box = document.getElementById("box");
   console.log(box.clientWidth, box.clientHeight);
   console.log(box.offsetWidth, box.offsetHeight)
</script>
</body>
</html>